export function up2down(isTrigger, dom, _delay = 0, time = .5,) {
    if (isTrigger) {
        TweenMax.fromTo(dom, time, {y: -1000, opacity: 0}, {y: 0, opacity: 1}).delay(_delay)
    } else {
        TweenMax.set(dom, {x: 0, y: 0, scale: 1, opacity: 1})
    }
}

export function down2up(isTrigger, dom, _delay = 0, time = .5,) {
    if (isTrigger) {
        TweenMax.fromTo(dom, time, {y: 1000, opacity: 0}, {y: 0, opacity: 1}).delay(_delay)
    } else {
        TweenMax.set(dom, {x: 0, y: 0, scale: 1, opacity: 1})
    }
}

export function left2right(isTrigger, dom, _delay = 0, time = .5,) {
    if (isTrigger) {
        TweenMax.fromTo(dom, time, {x: -1000, opacity: 0}, {x: 0, opacity: 1}).delay(_delay)
    } else {
        TweenMax.set(dom, {x: 0, y: 0, scale: 1, opacity: 1})
    }
}

export function right2left(isTrigger, dom, _delay = 0, time = .5,) {
    if (isTrigger) {
        TweenMax.fromTo(dom, time, {x: 1000, opacity: 0}, {x: 0, opacity: 1}).delay(_delay)
    } else {
        TweenMax.set(dom, {x: 0, y: 0, scale: 1, opacity: 1})
    }
}